package com.fyp.ptma.security;

import java.util.List;

import org.springframework.security.core.GrantedAuthority;

import com.fyp.ptma.model.User;

/**
 * 
 * @author YahyaArshad
 * 
 */
public class AuthorisedUser extends
		org.springframework.security.core.userdetails.User {
	/**
	 * 
	 */
	private static final long serialVersionUID = 4461689721464091858L;
	private User user;

	public AuthorisedUser(User user, List<GrantedAuthority> authorities) {

		super(user.getEmail(), user.getPassword(), true, true, true, true,
				authorities);

		this.user = user;
	}

	public User getUser() {
		return user;
	}
}
